package com.boe.common.base.jpa;

import lombok.*;
import java.time.*;
import javax.persistence.*;
import javax.persistence.Id;

import org.hibernate.annotations.*;
import com.fasterxml.jackson.databind.annotation.*;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import org.springframework.data.annotation.*;
import org.springframework.data.jpa.domain.support.*;

@Data
@MappedSuperclass
@EntityListeners(AuditingEntityListener.class)
public abstract class BaseEntity extends BaseIdEntity{


    /**
     * 创建时间.
     */
    @CreatedDate
    @Column(name = "create_at")
    protected LocalDateTime createAt;

    /**
     * 更新时间.
     */
    @LastModifiedDate
    @Column(name = "update_at")
    protected LocalDateTime updateAt;

    @CreatedBy
    private String createBy;

    @LastModifiedBy
    @Column(name = "update_by")
    private String updateBy;

    /**
     * 是否删除.
     */
    @Column(name = "is_deleted")
    private Boolean isDeleted = false;
}
